package test;

import java.sql.SQLException;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import service.WorkService;
import service.impl.WorkServiceImpl;

public class Action {

	public static void main(String[] args) throws SQLException {
		//create spring IOC Container....
		ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");
//		Render r1=context.getBean(Render.class);
//		r1.render();
//		DataSource dsDataSource = (DataSource)context.getBean("dataSource");
//		System.out.println(dsDataSource.getConnection());
//		
		WorkService ws = (WorkService)context.getBean("ws");
		ws.work("test work");
//		WorkServiceImpl impl = new WorkServiceImpl();
//		impl.work("nicole");
		
	}

}
